package model

import (
	"gorm.io/gorm"
	"time"
)

type ShortUrl struct {
	gorm.Model
	ID           uint64     `gorm:"id"`
	Deleted      int        `gorm:"deleted"`
	RequestId    string     `gorm:"request_id"`
	ShortenKey   string     `gorm:"shorten_key"`
	ShortUrl     string     `gorm:"short_url"`
	LongUrl      string     `gorm:"long_url"`
	ExpireAt     *time.Time `gorm:"expire_at"`
	RedirectCode int        `gorm:"redirect_code"`
}

func (su *ShortUrl) TableName() string {
	return "short_url"
}
